home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 642 b | 35 lines | [TEXT/CWIE] |
- // Assert.cp
-
- #ifndef Assert_h
- #include "Assert.h"
- #endif
- #ifndef ConstCString_h
- #include "ConstCString.h"
- #endif
-
- static const int8 *PathTail( const int8 *path )
- {
- const int8 *tail = path;
- for ( const int8 *p = path; *p!= 0; p++ )
- if ( *p == ':' )
- tail = p + 1;
-
- return tail;
- }
-
- DebugMessage AssertionMessage( const int8 *file,
- uint32 line,
- const int8 *condition )
- {
- DebugMessage message;
-
- message += "\pAssertion failure at line ";
- message += line;
- message += "\p of ";
- message += ConstCString( PathTail( file ) );
- message += "\p: ";
- message += ConstCString( condition );
-
- return message;
- }
-